<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="java.util.Vector,com.ejoysoft.wlanyz.business.Task,com.ejoysoft.common.Constants,com.ejoysoft.common.exception.IdObjectException,com.ejoysoft.common.exception.NoRightException" %>
<%@page import="com.ejoysoft.common.Format"%>
<%@page import="javax.crypto.Mac"%>
<%@ include file="../include/jsp/head.jsp"%>

<%
try{
	String strTaskId = ParamUtil.getString(request,"strId","");
	if(strTaskId.equals(""))
    	throw new IdObjectException("请求处理的信息id为空！或者已经不存在");
    
    String where="where strId='"+strTaskId+"'";
    Task obj=new Task(globa,false);
    Task obj1=obj.show(where);
    String temp1 = obj1.getDtCreatTime().substring(0, obj1.getDtCreatTime().lastIndexOf("."));
    int intState = obj1.getIntState();
    String intStateString = intState == 0?"未测试":"已测试";
    
    
    //String where1="where strTaskId='"+strTaskId+"'";
    //Task obj0=obj.show1(where1);
    
    //if(obj0==null){
    //    globa.closeCon();
    //    throw new IdObjectException("请求处理的信息id='"+strTaskId+"'对象为空！","请检查该信息的相关信息");
   // }
%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%=application.getAttribute("APP_TITLE")%></title> 
<link href="./common/css/css.css" rel="stylesheet" type="text/css"></link>
<script language="JavaScript" src="../include/date/popc.js"></script>
<script src="../include/js/list.js"></script>
<script language="javascript">
</script>
<style type="text/css">
<!--
body {
	background-color: #f2f8ff; font-size:12px; margin:0px; padding:0px;
}
.ipt4{ width:100px; height:31px; background:url(../images/cx1.jpg) ; font-size:14px; color:#FFFFFF; border:0px;}
.ipt1{ width:75px; height:31px; background:url(../images/cx.jpg); font-size:14px; color:#FFFFFF; border:0px;}
.sel1{ width:160px;}
.s6 a:link{ line-height:25px;height:25px; color:#333333}
.s6 a:hover{ line-height:25px;height:25px; color:#333333}
.listtit2{ height:26px; text-align:left; background:url(images/list_bg.jpg); line-height:26px; color:#000000; font-weight:bolder; border-right:1px solid #32a4ea;border-top:1px solid #32a4ea;line-height:26px; }
.listd{ height:26px;text-align:center; border-bottom:1px solid #dddddd;}
.listd2{ height:26px;text-align:left; border-bottom:1px solid #dddddd;border-right:1px solid #dddddd;border-left:1px solid #dddddd;}
.listdrd{ height:26px;text-align:center; border-bottom:1px solid #dddddd; color:#195b98;}
.listdrd a{ color:#195b98; text-decoration:none}
.page { color:#555;}
.page a{ color:#555; font-size:12px; text-decoration:none; font-family: "微软雅黑"}
.sel{color:#195b98; font-weight:bolder;}
.tdtit{ color:#000; }
-->
</style>
</head>


<body>
<form name=frm method=post action="task_list.jsp"> 
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><img src="../images/ri_list.jpg" width="14" height="14" align="absbottom" />&nbsp;您现在所在的位置：<font color="#0e7cc9">资源配置</font> &gt; 任务列表 &gt; 任务详细信息</td>
  </tr>
</table>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="8"></td>
        </tr><tr>
    <td height="25" valign="middle"><strong>&nbsp;任务详细信息</strong></td>
  </tr>
</table>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  
  <tr>
    <td height="45" valign="middle" bgcolor="e1eef7"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="1">
          <tr>
        <td height="8" colspan="3"></td>
        </tr><tr>
        <td height="26">AP名称:<%=obj1.getStrName()%></td>
        <td>MAC地址：<%=obj1.getStrMac()%></td>
        <td>创建时间：<%=temp1%></td>
      </tr>
      <tr>
        <td height="26">任务描述:<%=Format.forbidNull(obj1.getStrDesc())%></td>
        <td>任务内容:<%=obj1.getStrTestContent()%></td>
        <td>任务状态:<%=intStateString%></td>
      </tr>
          <tr>
        <td height="8" colspan="3"></td>
        </tr>
    </table></td>
  </tr>
</table>
<br>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">

  <tr>
    <td align="left" class="listtit2"  style="border-left:1px solid #32a4ea;">    &nbsp;&nbsp;任务检测结果</td>
  </tr>
  <tr>
    <td height="100%" class="listd2">
<br>
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="ACDBFB">
    <%
	String[] infos = null;
	String[] infos2 = null;
	 String[] ary = null;
	 String[] ary2 = null;
	 StringBuffer sb = new StringBuffer();
 	if(obj1.getIntState()==1)
 	{
 	   String where1="where strTaskId='"+obj1.getStrId()+"'";
       Task obj0=obj.show1(where1);
       String temp2 = obj0.getDtTestTime().substring(0, obj0.getDtTestTime().lastIndexOf("."));
       String temp3 = obj0.getDtCreatTime().substring(0, obj0.getDtCreatTime().lastIndexOf("."));
 	 %>
      <tr>
        <td align="center" bgcolor="#e1eef7">任务Id:<%=obj0.getStrTaskId()%></td>
        <td height="26" align="center" bgcolor="#e1eef7">测试人员联系方式:<%=(obj0.getStrPhone()==null?"无数据":obj0.getStrPhone())%></td>
        <td align="center" bgcolor="#e1eef7">测试时间:<%=(temp2==null?"无数据":temp2)%></td>
        <td align="center" bgcolor="#e1eef7"></td>
      </tr>
    </table>
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="10" colspan="4" class="tdtit"></td>
      </tr>
      <tr>
        <td height="25" colspan="4" class="tdtit"><img src="images/bj.gif" width="9" height="9" /> AP关联测试</td>
      </tr>
      </table>
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="ACDBFB">

      <tr>
        <td align="center" bgcolor="#e1eef7" style="border-left:1px solid #FFFFFF; border-top:1px solid #FFFFFF;">AP关联测试成功率</td>
        <td height="26" align="center" bgcolor="#e1eef7" style="border-left:1px solid #FFFFFF; border-top:1px solid #FFFFFF;">AP关联测试平均时延</td>
        <td align="center" bgcolor="#e1eef7"style="border-left:1px solid #FFFFFF; border-top:1px solid #FFFFFF;">结果上传时间</td>
      </tr>
      <tr>
        <td align="center" bgcolor="#FFFFFF"><%=(obj0.getRelevanceAPSuccessRate().equals("-1")?"无此项测试":(obj0.getRelevanceAPSuccessRate()+"%"))%></td>
        <td height="26" align="center" bgcolor="#FFFFFF"><%=(obj0.getRelevanceAPAvgTime().equals("-1")?"无此项测试":(obj0.getRelevanceAPAvgTime())+"秒")%></td>
        <td align="center" bgcolor="#FFFFFF"><%=temp3 %></td>
      </tr>
    </table>
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="10" colspan="4" class="tdtit"></td>
      </tr>
      <tr>
        <td height="25" colspan="4" class="tdtit"><img src="images/bj.gif" width="9" height="9" /> 同频干扰 </td>
      </tr>
    </table>
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="ACDBFB">
      <tr>
        <td align="center" bgcolor="#e1eef7" style="border-left:1px solid #FFFFFF; border-top:1px solid #FFFFFF;">网络名</td>
        <td height="26" align="center" bgcolor="#e1eef7" style="border-left:1px solid #FFFFFF; border-top:1px solid #FFFFFF;">Mac地址</td>
        <td align="center" bgcolor="#e1eef7"style="border-left:1px solid #FFFFFF; border-top:1px solid #FFFFFF;">信道</td>
        <td align="center" bgcolor="#e1eef7"style="border-left:1px solid #FFFFFF; border-top:1px solid #FFFFFF;">场强</td>
      </tr>
      <%  if(obj0.getSameFreInterference()!=null&&!obj0.getSameFreInterference().equals("-1")){
	        ary = obj0.getSameFreInterference().split(";");
	       for(int i = 0; i< ary.length; i++) {
	 	  infos = ary[i].split(",");
	 	  %>
      <tr>
         <td align="center" bgcolor="#FFFFFF"><%=infos[1] %> </td>
        <td height="26" align="center" bgcolor="#FFFFFF"><%=infos[0] %></td>
        <td align="center" bgcolor="#FFFFFF"><%=infos[2] %> </td>
        <td align="center" bgcolor="#FFFFFF"><%=infos[3] %> </td>
      </tr>
        <% 
 	  }
 	  }else{%>
 	  <tr>
        <td align="center" bgcolor="#FFFFFF">无此项测试或测试数据为空</td>
        <td height="26" align="center" bgcolor="#FFFFFF">无此项测试或测试数据为空</td>
        <td align="center" bgcolor="#FFFFFF">无此项测试或测试数据为空</td>
        <td align="center" bgcolor="#FFFFFF">无此项测试或测试数据为空</td>
      </tr>
 	  <% }
	          %>
    </table>
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="10" colspan="4" class="tdtit"></td>
      </tr>
      <tr>
        <td height="25" colspan="4" class="tdtit"><img src="images/bj.gif" width="9" height="9" /> 邻频干扰 </td>
      </tr>
    </table>
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="ACDBFB">
      <tr>
        <td align="center" bgcolor="#e1eef7" style="border-left:1px solid #FFFFFF; border-top:1px solid #FFFFFF;">网络名</td>
        <td height="26" align="center" bgcolor="#e1eef7" style="border-left:1px solid #FFFFFF; border-top:1px solid #FFFFFF;">Mac地址</td>
        <td align="center" bgcolor="#e1eef7"style="border-left:1px solid #FFFFFF; border-top:1px solid #FFFFFF;">信道</td>
        <td align="center" bgcolor="#e1eef7"style="border-left:1px solid #FFFFFF; border-top:1px solid #FFFFFF;">场强</td>
      </tr>
        <%  if(obj0.getNeiFreInterference()!= null&&!obj0.getNeiFreInterference().equals("-1")){
	         ary2 = obj0.getNeiFreInterference().split(";");
	       for(int i = 0; i< ary2.length; i++) {
	 	  infos2 = ary2[i].split(",");
	 	  %>
      <tr>
        <td align="center" bgcolor="#FFFFFF"><%=infos2[1] %> </td>
        <td height="26" align="center" bgcolor="#FFFFFF"><%=infos2[0] %></td>
        <td align="center" bgcolor="#FFFFFF"><%=infos2[2] %> </td>
        <td align="center" bgcolor="#FFFFFF"><%=infos2[3] %> </td>
      </tr>
       <% 
 	  }
 	  }else{%>
 	   <tr>
        <td align="center" bgcolor="#FFFFFF">无此项测试或测试数据为空</td>
        <td height="26" align="center" bgcolor="#FFFFFF">无此项测试或测试数据为空</td>
        <td align="center" bgcolor="#FFFFFF">无此项测试或测试数据为空</td>
        <td align="center" bgcolor="#FFFFFF">无此项测试或测试数据为空</td>
      </tr>
      
 	  <% }
	          %>
      
    </table>
    <p>&nbsp;</p></td>
  </tr>
  	<%
 	 }
 	 else{
 	  %>  <tr>
	        <td>&nbsp;</td>
	        <td align="center" colspan="3">暂无测试结果</td> 
	        <td>&nbsp;</td>
	      </tr>
	       </table>
 	  <%} %>
 	  
</table>
<table>
	<tr>
	<td width="65%"></td>
	<td>&nbsp; &nbsp;</td>
	<td height="50"  align="center">
	<input name="B1" type="button"   value="查看历史任务" onclick="window.location.href='task_lookold.jsp?strMac=<%=obj1.getStrMac()%>&dtCreatTime=<%=obj1.getDtCreatTime()%>';"  class="ipt4" style="cursor:hand; width:100px"/>&nbsp;&nbsp;&nbsp;
	<input name="B12" type="button"  onclick="window.location.href='task_list.jsp';" value="返 回" class="ipt1" style="cursor:hand"/>
	</td>
	<td>&nbsp; &nbsp;</td>
	</tr>
</table>
 </form>
</body>
</html>
<%}catch(Exception e){e.printStackTrace();} %>
<%@ include file="../include/jsp/footer.jsp"%>



